﻿CREATE TABLE [dbo].[Date](
	[date_id] [int] IDENTITY(1,1) NOT NULL,
	[real] [smalldatetime] NOT NULL,
	[year] [smallint] NOT NULL,
	[quarter] [tinyint] NOT NULL,
	[month] [tinyint] NOT NULL,
	[day_of_year] [smallint] NOT NULL,
	[day] [tinyint] NOT NULL,
	[week] [tinyint] NOT NULL,
	[weekday] [tinyint] NOT NULL,
	[hour] [tinyint] NOT NULL,
	[minute] [tinyint] NOT NULL,
	[service_level] [tinyint] NOT NULL,
	[is_holiday] [bit] NOT NULL,
	[is_businessday] [bit] NOT NULL,
	[prev_12_months] [bit] NOT NULL,
	[prev_6_months] [bit] NOT NULL,
	[prev_3_months] [bit] NOT NULL,
	[prev_12_weeks] [bit] NOT NULL,
	[prev_4_weeks] [bit] NOT NULL,
	[prev_14_days] [bit] NOT NULL,
	[prev_7_days] [bit] NOT NULL,
	[prev_24_hours] [bit] NOT NULL,
 CONSTRAINT [PK_Date_date_id] PRIMARY KEY CLUSTERED 
(
	[date_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 100) ON [PRIMARY]
) ON [PRIMARY]
